Skip to content

Add NIL project tooling and compiler-backed editor navigation - #7

Merged
bytetroll merged 4 commits into
masterfrom
codex/developer-tooling
Oct 19, 2026
Merged

bytetroll merged 4 commits into
masterfrom
codex/developer-tooling

Conversation

@bytetroll

@bytetroll bytetroll commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Ny and Matrix applications now share a project definition between command-line builds and live VS Code checks. nil.project.json records the entrypoint, import roots, SDK and analyzer policy; the new SDK tool nilbuild provides describe/check/build/run commands for VM and native targets. Builds require successful analysis and publish staged artifacts atomically, so a failed build cannot run an old executable.

The compiler's default analyzer adds unreachable-statement and discarded standard Option/Result warnings, a discoverable rule catalog, suppression and warnings-as-errors. The --workspace-stdin interface accepts bounded, versioned source snapshots. Unsaved and new Ny/Matrix imports and Ny textual includes use normal import precedence, with canonical identities and explicit input/expansion limits.

Both frontends now preserve exact source name spans, and the type checker retains declaration identities and resolved occurrence bindings. The optional --semantic-index analysis output powers VS Code Go to Definition for supported functions, variables, parameters and loop binders across source imports. Navigation follows the actual compiler binding through lexical shadowing, Matrix spelling normalization and mixed-language unsaved buffers. UTF-8 source spans map to editor UTF-16 ranges. The editor checks document versions, aliases and every consumed source snapshot before returning a location, and watches all indexed native dependencies.

VS Code also shares project settings with builds, reports compiler diagnostics, guards fixes against source changes, and supplies project commands, tasks and manifest JSON completion. Dependency edits, closure and context changes cancel stale checks. Identical aliases coalesce, conflicting aliases fail explicitly, and closed cached models cannot block active edits.

The initial Linux project profile supports one executable with imports and full rebuilds. The source index is explicitly partial and requires successful analysis, including analyzer policy. Unsupported bindings produce no guessed destination; binary dependencies and exhausted index budgets disable the index. Fields, member dispatch, type uses, generated-source maps, semantic completion, complete references/rename, language-authored analyzer hosting and project graphs remain follow-up work. Findings F37–F41 and NIL-0009/NIL-0010 document the contracts and remaining gaps, including Matrix function-value spelling normalization.

Validation on clean commit 6b846cb:

  • Release SDK build: 445/445 CTests passed; nine-tool SDK contract validated.
  • Installed consumer matrix: 848 native/VM executions passed with source and binary libraries.
  • Copied SDK outside the checkout: 35 compiler semantic checks passed, including the full 31-check protocol contract, definitions into the installed standard library from both languages, and binary-only dependency exclusion. SDK payload validation passed before and after testing.
  • VS Code: 84 unit tests and 39 real extension-host checks passed; the final host run used only the committed SDK. Coverage includes shadowing, Unicode/CRLF, Matrix name normalization, mixed-language dirty imports, named untitled targets, moved declarations, stale-result suppression and textual-include changes.
  • VSIX packaged and installed; all 12 packaged payload files and package metadata matched the installed extension. The bundle contains the semantic protocol and definition provider.

@bytetroll bytetroll changed the title Add NIL project builds and compiler-backed editor analysis Add NIL project builds and compiler-backed workspace analysis Oct 19, 2026
@bytetroll bytetroll changed the title Add NIL project builds and compiler-backed workspace analysis Add NIL project tooling and compiler-backed editor navigation Oct 19, 2026
@bytetroll
bytetroll merged commit 2cc4839 into master Oct 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant